package com.xwh.article.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xwh.article.entity.SoftwareVersion;
import com.xwh.article.mapper.SoftwareVersionMapper;
import com.xwh.article.service.SoftwareVersionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xwh
 **/
@Service
public class SoftwareVersionServiceImpl extends ServiceImpl<SoftwareVersionMapper, SoftwareVersion> implements SoftwareVersionService {

    @Override
    public void add(SoftwareVersion softwareVersion) {
        save(softwareVersion);
    }

    @Override
    public List<SoftwareVersion> listBySoftwareId(String softwareId) {
        QueryWrapper<SoftwareVersion> query = new QueryWrapper<>();
        query.eq("software_id", softwareId);
        return list(query);
    }
}
